<extend name="Base/common"/>

<block name="body">
<style>
.sean:hover{
    box-shadow: 2px 2px 10px #888888;
    background:rgb(245,246,247);
    -webkit-transition: all .3s ease-out;
    -moz-transition: all .3s ease-out;
    -ms-transition: all .3s ease-out;
    -o-transition: all .3s ease-out;
    transition: all .3s ease-out;
  }
  .manjian-items i{color: #FFF;
      background: #f28659;
      padding: 2px 5px;
      font-size: 12px;
      border-radius: 3px;
      margin-right: 8px;
  }
  .manjian-items span{
      display: inline-block;
      margin-top: 5px;
      margin-right: 5px;
  }
 .store-div-fl{float:left;width:68%;}
 .store-div-fr{float:right;width:20%;}
 .store-div-fl .store-div-fl-div1{margin: 5px auto;width: 100%;}
 .store-div-fl .store-div-fl-div1 label{margin-left: 10px;}
 .store-div-fl .store-div-fl-div1 textarea{width: 60%;}
 .store-div-fr .delivery-select{width: 100%;}
 .store-div-fr .delivery-select .form-group{margin: 5px auto;float:right;}
 .store-div-fr .delivery-select .form-group label{margin-left: 10px;}
 .store-div-fr .delivery-select .form-group span{color:#ff4a00;min-width:134px;display: inline-block;}
 .real-name-p{margin: 10px 15%;text-align: center;padding: 2px;border: solid 1px rgb(43,135,1);border-radius: 1px;}
 .real-name-p em{font-weight: bold; color:rgb(43,135,1)}
</style>
  <form action="{:U('add')}" id="J_checkout_form" method="post">
    <div class="row">
      <div class="col-xs-12">
        <!-- 收货地址 -->
        <div class="page-header"><h3>收货地址</h3></div>
        <div class="row" id="J_address_list">
          <volist name="receiver" id="vo">
            <php>$selected = ($vo['is_default'] == 1 || count($receiver) == 1) ? 1 : 0;</php>
            <div class="col-xs-3 address-item <eq name="selected" value="1">selected</eq> J_address_item" data-id="{$vo.id}" data-name="{$vo.name}" data-mobile="{$vo.mobile}" data-province="{$vo.province}" data-district="{$vo.district}" data-city="{$vo.city}" data-area="{$vo.area}" data-address="{$vo.address}" data-zipcode="{$vo.zipcode}" data-is_default="{$vo.is_default}">
              <dl>
                <dt><strong class="itemConsignee">{$vo.name}</strong></dt>
                <dd>
                  <p class="itemRegion"><eq name="vo.is_default" value="1"><em class="text-danger">[默认]</em></eq>{$vo.area}{$vo.address}({$vo.zipcode})</p>
                  <p class="tel itemTel">{$vo.mobile}</p>
                  <span class="edit-btn btn btn-xs btn-positive J_edit_address">修改</span>
                </dd>
                <dd style="display:none">
                  <input type="radio" name="receiver_id" class="J_receiver_id" value="{$vo.id}" <eq name="selected" value="1">checked="checked"</eq>>
                </dd>
              </dl>
            </div>
          </volist>
          <div class="col-xs-3 address-item use-new-addr J_address_item J_add_address" id="useNewAddr" data-state="off">
            <dl>
              <span class="icon icon-add"></span>使用新地址
            </dl>
          </div>
        </div>
        <div class="address-edit-box" id="J_address_edit_box">
          <div class="bd">
            <input type="hidden" name="id" id="J_address_id" value="">
            <div class="item">
              <input type="text" name="name" id="J_input_name" class="input" placeholder="收货人姓名" maxlength="15" value="">
              <p class="tip-msg tipMsg" style="display: none;"></p>
            </div>
            <div class="item">
              <input type="text" name="mobile" id="J_input_mobile" class="input" placeholder="手机号码" maxlength="11" value="">
              <p class="tip-msg tipMsg" style="display: none;"></p>
            </div>
            <div class="item item-area" id="J_address_area">加载中...</div>
            <div class="item">
              <textarea name="address" class="input-area" id="J_input_address" placeholder="路名或街道地址，门牌号"></textarea>
              <p class="tip-msg tipMsg" style="display: none;"></p>
            </div>
            <div class="item">
              <input type="text" name="zipcode" id="J_input_zipcode" class="input" placeholder="邮政编码" maxlength="6" value="">
              <p class="tip-msg tipMsg" style="display: none;"></p>
            </div>
            <div class="item set-default">
              <label for="J_is_default"><input type="checkbox" name="is_default" id="J_is_default" value="1">设为默认收货地址</label>
              <p class="tip-msg tipMsg" style="display: none;"></p>
            </div>
          </div>
          <div class="ft clearfix"  style="float:left;">
            <button type="button" class="btn btn-sm" id="J_edit_address_cancel" style="margin-right:12px">重新选择地址</button>
            <a href="javascript:;" class="btn btn-sm btn-positive" id="J_edit_address_ok">确认收货地址</a>
          </div>
        </div>
        <!-- 实名制购买 -->
        <if condition="C('REAL_NAME') eq 1">
          <div class="page-header">
            <h3>实名信息备案</h3>
          </div>
          <p style='margin: 10px 15%;text-align: center;padding: 2px;border: solid 1px rgb(43,135,1);border-radius: 1px;'>
            <em style="font-weight: bold; color:rgb(43,135,1)">温馨提示：</em>因涉及国家监管部门规定，需要核对购买人信息，网站不会保留相关个人信息，请放心购买</p>
          <div class="row form-inline">
           <div class="form-group" >
              <label for='username' style="text-indent:2em">真实姓名:</label>
              <input type="text" id='username' class="rname form-control" name="realname"><span style='color: red'>*</span>
           </div>
          </div>
          <br />
          <div class="row form-inline">
           <div class="form-group" >
              <label for='sfz' style="text-indent:2em">身份证号:</label>
              <input type="text" id='sfz' class="form-control idcard" name="idcard"><span style='color: red'>*</span>
           </div>
          </div>
        </if>
        <!-- 发票信息 -->
        <if condition="C('IS_RECEIPT') eq 1">
          <div class="page-header">
            <h3>发票信息</h3>
          </div>
          <div class="row">
            <div id="invoice_html" class="col-xs-3 form-control" data-state="off">
              <div class="col-xs-3">
                  <span> 不开发票</span>
              </div>
              <div><a class="text-danger" id="edit_receipt" href="javascript:;" >修改</a></div>
            </div>
          </div>
        </if>
        <!-- 商品清单 -->
        <div class="page-header">
          <h3>商品清单</h3>
        </div>
        <div class="cart-list order-item-list">
          <dl>
            <dt class="clearfix">
              <div class="row">
                <span class="col-xs-7 order_attr" data-attr='1'>商品信息</span>
                <span class="col-xs-1">单价</span>
                <span class="col-xs-2">数量</span>
                <span class="col-xs-2">小计</span>
              </div>
            </dt>
            <volist name="data.items" id="supp" >
              <div class="supplier-box">
                <dd class="supplier-dd">
                  <div class="row">
                    <span class="col-xs-3">
                      <span class="check active"></span>
                      <gt name="supp.store_id" value="0">{$supp.store_name} <else /> <span class="is-self">平台直营</span></gt>
                    </span>
                    <span class="col-xs-6 send-items J_send_supp_{$supp.store_id}"></span>
                    <php>$manjian = get_store_manjian($supp['store_id']);</php>
                    <notempty name="manjian.msg">
                      <span class="col-xs-2 manjian-items" data-man="{$manjian.man}" data-jian="{$manjian.code}"><i>满减活动</i><span>{$manjian['msg']}</span></span>
                    <else />
                      <span class="col-xs-2 manjian-items" data-man="0" data-jian="0"></span>
                    </notempty>
                  </div>
                </dd>
                <volist name="supp.item" id="vo">
                  <dd class="item item_{$vo['item_id']}_{$vo['item_code']}" data-attr='{$vo["item_id"]}'>
                    <div class="row">
                      <div class="col-xs-7">
                        <div class="pic">
                          <a href="{:U('Item/detail', array('id' => $vo['item_id']))}" target="_blank"><img src="{:get_image_thumb($vo['cover_path'], 100, 100)}" alt="{$vo.name}"></a>
                        </div>
                        <div class="info">
                          <div class="name"><a href="{:U('Item/detail', array('id' => $vo['item_id']))}" target="_blank">{$vo.name} <b class='show_mess'></b></a></div>
                          <if condition="$vo['stock'] lt $vo['quantity'] && !C('START_POSITION')"><em class="text-danger">此商品所购买数量大于库存</em></if>
                          <notempty name="vo.spec">
                            <div class="spec">
                              <volist name="vo.spec" id="vl">
                                <span class="mr-sm">{$vl.key}：{$vl.val}</span>
                              </volist>
                            </div>
                          </notempty>
                        </div>
                      </div>
                      <div class="col-xs-1">
                        <div class="box price">
                            <span class="text-danger">
                            <em class="yen">&yen;</em> <i class="danjia">{$vo.price}</i>
                            </span>
                        </div>
                        <!-- 老客户立减 -->
                        <div class="price-tip">
                          <if condition="$vo.dis_price gt 0">
                            <span class="text-left">老客户立减</span>
                          </if>
                        </div>
                      </div>
                      <div class="col-xs-2">
                        <div class="box">&nbsp;&nbsp;x {$vo.quantity}</div>
                      </div>
                      <div class="col-xs-2">
                        <div class="box price">
                          <strong class="text-danger"><em class="yen">&yen;</em><i class="zongjia" data-store="{$supp.store_id}"> {$vo['subAmount']}</i></strong>
                        </div>
                        <div class="price-tip">
                          <if condition="$vo['discount_name']">
                            <span class="text-left">{$vo.discount_name}</span>
                          </if>
                        </div>
                      </div>
                    </div>
                  </dd>
                </volist>
                <div class="row sean" style="margin: auto 0;padding-top:10px;">
                  <div class="store-div-fl">
                    <div class="col-xs-9 form-inline" >
                        <div class="form-group store-div-fl-div1">
                          <label for='mess'>留言：</label>
                          <textarea class="form-control " id='mess' <eq name="store_num" value="1"> rows="1"<else /> rows="3"</eq> name="memo[{$supp.store_id}]"></textarea>
                        </div>
                    </div>
                    <!-- 商户优惠券 -->
                    <gt name="supp.coupon_total" value="0">
                    <div class="col-xs-9 form-inline">
                      <div class="order-pay-extend J_itemlist">
                        <!-- coupon-box -->
                          <div class="item S_order_coupon_box" data-store="{$supp.store_id}" id="S_order_coupon_box_{$supp.store_id}">
                            <input type="checkbox" name="useCoupon" id="S_use_coupon_{$supp.store_id}">
                            <i class="icon icon-checkbox "></i>使用优惠券（<em class="text-danger">有可用优惠券</em>）
                          </div>
                          <div class="item-box S_coupon_box" id="S_coupon_box_{$supp.store_id}">
                            <span class="arrow-border"></span><span class="arrow-bg"></span>
                            <div class="coupon-tab-nav clearfix" id="J_coupon_tab_bav_{$supp.store_id}">

                                <span class="nav-item couponList current" style="cursor: default;">我的优惠券（<em class="J_coupon_total">{$supp.coupon_total}</em>）</span>

                              <span class="nav-item" style="display: none;">激活新优惠券</span>
                            </div>
                            <div class="coupon-tab-con" id="S_coupon_tab_con_{$supp.store_id}">
                              <!-- 我的优惠券 -->
                              <div class="con-item current">
                                <div class="con-item-bd">
                                  <ul class="coupon-list S_couponList">
                                    <volist name="supp.coupon_lists" id="vo">
                                       <li>
                                        <label for="coupon_store_item_{$vo.Coupon.id}">
                                          <input type="radio" name="store_coupons[]" value="{$vo.Coupon.number}" id="coupon_store_item_{$vo.Coupon.id}" />
                                          <i>{$vo.Coupon.name}（<eq name="vo.Coupon.norm" value="0">全场不限制<else/>满{$vo.Coupon.norm}元使用</eq>）</i>
                                          <span>{$vo.Coupon.amount} 元</span>
                                        </label>
                                      </li>
                                    </volist>                     
                                  </ul>                     
                                </div>
                                <div class="con-item-ft ">
                                  <p class="coupon-tip" id="S_my_coupon_tip_{$supp.store_id}"></p>
                                  <a href="javascript:;" class="btn btn-sm S_cancel_coupon_btn" data-store="{$supp.store_id}">取消使用</a>
                                  <input type="button" class="btn btn-sm btn-positive S_select_coupon_btn" value="确认使用">
                                </div>
                              </div>
                              <!-- 激活新优惠券 -->
                              <div class="con-item"> 
                                <div class="con-item-bd">
                                  <input type="text" name="couponCode" id="J_coupon_code_{$supp.store_id}" class="form-control coupon-code" placeholder="请输入优惠券激活码">
                                </div>
                                <div class="con-item-ft">
                                  <p class="coupon-tip" id="J_activate_coupon_tip_{$supp.store_id}"></p>
                                  <a href="#" class="btn btn-sm J_cancel_activate_btn">取消</a>
                                  <a href="#" class="btn btn-positive btn-sm" id="J_activate_coupon_btn">激活并使用</a>
                                </div>
                              </div>
                            </div>
                          </div>
                      </div>
                    </div>
                    </gt>
                  </div>
                  
                  <div class="store-div-fr">
                    <div class="col-xs-9 form-inline delivery-select" data-state="off">
                        <!--运费-->
                        <div class="form-group" id="wuliu_{$supp.store_id}">
                          <label for='wuliu'>运费：</label>
                            <input type="hidden" class="S_delivery_fee" name="store_freight[{$supp.store_id}]" value="{$data['delivery'][$supp['store_id']]['price']}" />
                            <span>{:number_format($data['delivery'][$supp['store_id']]['price'],2)}元</span>
                        </div>
                        <!--优惠券金额-->
                        <gt name="supp.coupon_total" value="0">
                        <div class="form-group" id="shop_coupon_{$supp.store_id}">
                          <label for="coupon_amount">优惠抵扣：</label>
                          <input type="hidden" class="store_coupons_fee" name="store_coupons_val[{$supp.store_id}]" value="0" />
                          <input type="hidden" name="store_coupons_use[{$supp.store_id}]" value="0" />
                          <input type="hidden" name="store_coupons_id[{$supp.store_id}]" value="0" />
                          <span>-0.00元</span>
                        </div>
                        <else />
                          <input type="hidden" class="store_coupons_fee" name="store_coupons_val[{$supp.store_id}]" value="0" />
                          <input type="hidden" name="store_coupons_use[{$supp.store_id}]" value="0" />
                          <input type="hidden" name="store_coupons_id[{$supp.store_id}]" value="0" />
                        </gt>
                        <!--满减金额-->
                        <if condition="$buynow eq 0">
                        <php>$manjian_amount = get_store_manjian($supp['store_id'],true);</php>
                        <else />
                        <php>$manjian_amount = get_store_manjian($supp['store_id'],true, $buynow);</php>
                        </if>
                        <php>$total_amount = get_store_amount($supp['store_id'],$supp['item'],$data['delivery'][$supp['store_id']]['price'],$buynow);</php>
                        <notempty name="manjian_amount.code">
                        <div class="form-group" id="store-manjian-{$supp.store_id}" data-jian="{$manjian_amount['code']}">
                          <label for='manjian'>满减金额：</label>
                          <input type="hidden" class="store_manjian_fee" name="store_manjian[{$supp.store_id}]" value="{$manjian_amount['code']}" /><span>-{:number_format($manjian['code'],2,'.','')}元</span>
                        </div>
                        <else />
                            <input type="hidden" data-jian="0"  id="store-manjian-{$supp.store_id}" class="store_manjian_fee" name="store_manjian_{$supp.store_id}" value="0" />
                        </notempty>
                        <!--店铺合计-->
                        <div class="form-group" id="shop_order_{$supp.store_id}">
                          <label for='total_mount'>本店合计：</label>
                          <input type="hidden" class="store-items-amount" data-store="{$supp.store_id}" name="store_amount[{$supp.store_id}]" value="{$total_amount}" /><span>{:number_format($total_amount,2,'.','')}元</span>
                        </div>
                    </div>
                  </div>
                  
                </div>
              </div>
            </volist>
          </dl>
        </div>
        <!-- 优惠券、礼品卡、账户余额 -->
        <div class="order-count clearfix">
          <div class="order-pay-extend J_itemlist">
            <!-- coupon-box -->
            <php>if(!empty($data['coupons']['lists'])){</php>
              <div class="item" id="J_order_coupon_box">
                <input type="checkbox" name="useCoupon" id="J_use_coupon">
                <i class="icon icon-checkbox "></i>使用优惠券（<notempty name="data.coupons.lists"><em class="text-danger">有可用优惠券</em><else/>暂无可用优惠券</notempty>）
              </div>
              <div class="item-box" id="J_coupon_box">
                <span class="arrow-border"></span><span class="arrow-bg"></span>
                <div class="coupon-tab-nav clearfix" id="J_coupon_tab_bav">
                  <span class="nav-item couponList current" style="cursor: default;">我的优惠券（<em class="J_coupon_total"></em>）</span>
                  <span class="nav-item" style="display: none;">激活新优惠券</span>
                </div>
                <div class="coupon-tab-con" id="J_coupon_tab_con">
                  <!-- 我的优惠券 -->
                  <div class="con-item current">
                    <div class="con-item-bd">
                      <notempty name="data.coupons.lists">
                        <ul class="coupon-list J_couponList">
                          <volist name="data.coupons.lists" id="vo">
                            <li>
                              <label for="coupon_item_{$vo.Coupon.id}">
                                <input type="radio" name="order[coupons][]" value="{$vo.Coupon.number}" id="coupon_item_{$vo.Coupon.id}" />
                                <i>{$vo.Coupon.name}（<eq name="vo.Coupon.norm" value="0">全场不限制<else/>满{$vo.Coupon.norm}元使用</eq>）</i>
                                <span>{$vo.Coupon.amount} 元</span>
                              </label>
                            </li>
                          </volist>
                        </ul>
                      <else/>
                        <span>暂无可用优惠券</span>
                      </notempty>
                    </div>
                    <div class="con-item-ft <empty name="data.coupons.lists">hide</empty>">
                      <p class="coupon-tip" id="J_my_coupon_tip"></p>
                      <a href="#" class="btn btn-sm" id="J_cancel_coupon_btn">取消使用</a>
                      <input type="button" class="btn btn-sm btn-positive" id="J_select_coupon_btn" value="确认使用">
                    </div>
                  </div>
                  <!-- 激活新优惠券 -->
                  <div class="con-item"> 
                    <div class="con-item-bd">
                      <input type="text" name="couponCode" id="J_coupon_code" class="form-control coupon-code" placeholder="请输入优惠券激活码" />
                    </div>
                    <div class="con-item-ft">
                      <p class="coupon-tip" id="J_activate_coupon_tip"></p>
                      <a href="#" class="btn btn-sm J_cancel_activate_btn">取消</a>
                      <a href="#" class="btn btn-positive btn-sm" id="J_activate_coupon_btn">激活并使用</a>
                    </div>
                  </div>
                </div>
              </div>
            <php>}</php>
            
            <!-- card-box -->
            <php>if(!empty($data['cards']['lists'])){</php>
              <div class="item" id="checkoutCardBox">
                <input type="checkbox" name="useCard" id="useCard">
                <i class="icon icon-checkbox "></i>使用礼品卡（<notempty name="data.cards.lists"><em class="text-danger">有可用礼品卡</em><else/>暂无可用礼品卡</notempty>）
              </div>
              <div class="item-box" id="J_card_box">
                <span class="arrow-border"></span><span class="arrow-bg"></span>
                <div class="coupon-tab-nav clearfix" id="cardTabNav">
                  <span class="nav-item couponList current" style="cursor: default;">我的礼品卡（<em class="J_card_total">{$data.cards.total}</em>）</span>
                  <span class="nav-item" style="display:none">绑定新礼品卡</span>
                </div>
                <div class="coupon-tab-con" id="cardTabCon">
                  <!-- 我的的礼品卡 -->
                  <div class="con-item current">
                    <div class="con-item-bd">
                      <notempty name="data.cards.lists">
                        <ul class="coupon-list" id="J_card_list">
                          <volist name="data.cards.lists" id="vo">
                            <li>
                              <label for="cards_item_{$vo.Card.id}">
                                <input type="checkbox" name="order[cards][]" value="{$vo.Card.number}" id="cards_item_{$vo.Card.id}" />
                                <i>{$vo.Card.name}</i>
                                <span>{$vo.Card.balance} 元</span>
                              </label>
                            </li><br />
                          </volist>
                        </ul>
                      <else/>
                        <span>暂无可用的礼品卡</span>
                      </notempty>
                    </div>
                    <div class="con-item-ft <empty name="data.cards.lists">hide</empty>">
                      <p class="coupon-tip" id="myCardTip"></p>
                      <a href="#" class="btn btn-lineDakeLight btn-sm J_cancelCardBtn">取消使用</a>
                      <input type="button" class="btn btn-positive btn-sm" id="selectCardBtn" value="确认使用">
                    </div>
                  </div>
                  <!-- 绑定礼品卡 -->
                  <div class="con-item"> 
                    <div class="con-item-bd">
                      <input type="text" name="card_number" id="card_number" class="form-control card-no" placeholder="礼品卡号">
                      <input type="password" name="card_password" id="card_password" class="form-control card-pwd" placeholder="密码">
                    </div>
                    <div class="con-item-ft">
                      <p class="coupon-tip" id="bindCardTip"></p>
                      <a href="#" class="btn btn-lineDakeLight btn-sm J_cancelBindBtn">取消</a><a href="#" class="btn btn-positive btn-sm" id="bindCardBtn">绑定并使用</a>
                    </div>
                  </div>
                </div>
              </div>
            <php>}</php>
            
            <!-- score-box -->
            
            <if condition="(C('SCORE_EXCHANGE_STATUS') eq 1) AND ($member['score'] gt 0)">
              <!-- finance-box -->
              <div class="item" id="J_order_score_box">
                <input type="checkbox" name="use_score" id="J_use_score">
                <i class="icon icon-checkbox "></i>使用积分（可用：<em class="text-danger">{$member.score}</em> 积分）
              </div>
              </if>
              <!-- finance-box -->
              <if condition="$finance gt 0">
              <div class="item" id="J_order_finance_box">
                <input type="checkbox" name="use_finance" id="J_use_finance">
                <i class="icon icon-checkbox "></i>使用账户余额（可用余额：<em class="text-danger">{$finance}</em> 元）
                <span class="finance-result" id="financeResult"></span>
              </div>
            </if>
          </div>
          <input type="hidden" name="buynowss" value="{$buynow}" />
          <!-- order-price -->
          <div class="order-price">
            <eq name="store_num" value="0">
              <ul>
                <li>商品数量：<span id='J_delivery_num'>{$order_count.total_quantity} 件</span></li>
                <li>商品总价：<span id='J_delivery_amount'>{$order_count.total_price} 元</span></li>
                <li>运费：<span id="J_delivery_fee">0.00 元</span></li>
                <php>if(!empty($data['coupons']['lists'])){</php>
                  <li>优惠券抵扣：<span id="J_coupon_desc">-0 元</span></li>
                <php>}</php>
                <php>if(!empty($data['cards']['lists'])){</php>
                  <li>礼品卡抵扣：<span id="J_card_desc">-0 元</span></li>
                <php>}</php>             
                <if condition="(C('SCORE_EXCHANGE_STATUS') eq 1) AND ($member['score'] gt 0)">
                <li class="hidden" id="J_score_desc">积分抵扣：<span>-0 元</span></li>
                </if>             
                <if condition="$order_count['manjian']">
                  <li class="hidden">满减优惠：<span id="J_promote_desc">.. 元</span></li>
                </if>              
                <php>if($finance > 0){</php>
                <li>账户余额支付：<span id="J_finance_desc">-0 元</span></li>
                <php>}</php>
                <if condition="session('user_auth.group_id') gt 0">
                  <li>{:get_group_name(session('user_auth.group_id'))}：<span id="cardDesc">{:get_group_description(session('user_auth.group_id'))}</span></li>
                </if>
              </ul>
              <p class="total">
                应付总额：<span class="text-danger"><strong id="J_total_price">0</strong>元</span>
              </p>
            <else />
              <ul>
                <php>if(!empty($data['coupons']['lists'])){</php>
                  <li>优惠券抵扣：<span id="J_coupon_desc">-0 元</span></li>
                <php>}</php>
                <php>if(!empty($data['cards']['lists'])){</php>
                  <li>礼品卡抵扣：<span id="J_card_desc">-0 元</span></li>
                <php>}</php>
                <if condition="(C('SCORE_EXCHANGE_STATUS') eq 1) AND ($member['score'] gt 0)">
                <li class="hidden" id="J_score_desc">积分抵扣：<span>-0 元</span></li>
                </if>
                <if condition="$order_count['manjian']">
                  <li class="hidden">满减优惠：<span id="J_promote_desc">.. 元</span></li>
                </if>
                <php>if($member['finance'] > 0){</php>
                <li>账户余额支付：<span id="J_finance_desc">-0 元</span></li>
                <php>}</php>
                <if condition="session('user_auth.group_id') gt 0">
                  <li>{:get_group_name(session('user_auth.group_id'))}：<span id="cardDesc">{:get_group_description(session('user_auth.group_id'))}</span></li>
                </if>
              </ul>
              <p class="total">
                应付总额：<span class="text-danger"><strong id="J_total_price">0</strong>元</span>
              </p>
            </eq>
          </div>
        </div>
        <input type="hidden" name="store_num" value="{$store_num}" />
        <input type="hidden" id="J_delivery_fee_new" value="0">
        <input type="hidden" id="J_is_use_finance" name="is_use_finance">
        <input type="hidden" id="J_use_score_number" name="use_score">
        <input type="hidden" id="J_use_score_amount" name="score_amount">
        <input type="hidden" id="J_coupon_id" name="coupon_id">
        <input type="hidden" id="J_card_id" name="card_id">
        <input type="hidden" name="buynow" id="buynow" value="{$buynow}">
        <input type="hidden" name="item_ids" id="J_item_ids" value="{$item_ids}">
        <input type="hidden" name="cart_ids" id="J_cart_ids" value="{$cart_ids}" />
        <input type="hidden" name="invoice_title" id="invoice_title">
        <div class="order-confirm">
          <div id="submitAddress"></div>
          <if condition="$buynow eq 0">
            <span><a href="{:U('Cart/index')}" class="btn btn-link">返回修改购物车</a></span>
          </if>
          <a href="javascript:;" class="pull-right btn btn-positive" id="J_order_submit">立即下单</a>
        </div>
      </div>
      <div class="address-edit-backdrop" id="J_editAddrBackdrop"></div>
    </div>
  </form>
  <include file="Order/invoice" />
</block>

<block name="script">
   {:hook('noticeMsg')}
  <style type="text/css">
      .zone_out{cursor: default;}
      .cart-list .zone_out{ 
          position:relative; 
          -webkit-filter: grayscale(100%);
          -moz-filter: grayscale(100%);     
          -ms-filter: grayscale(100%);     
          -o-filter: grayscale(100%);          
          filter: grayscale(100%);       
          filter: gray; 
        }
      .cart-list .zone_out:before{ 
          content:"无货"; 
          color:#fff; 
          background:rgba(246,55,86,1); 
          width:42px; 
          text-align:center;
          height:30px; 
          line-height:30px; 
          position: absolute; 
          top:25px; 
          right:-10px; 
          z-index:999;
      }
      .cart-list .zone_out .row:before{
          width: 0;
          position: absolute; 
          top:55px; 
          right:-10px;
          height: 0;
          border-top: 0px solid transparent;
          border-left: 9px solid rgba(246,55,86,1);
          border-bottom: 10px solid transparent;}
  </style>
  <script>
    seajs.use(['order', 'receiver', 'cart','invoice'], function(order, receiver, cart,invoice){

      var total_price = order.getStoreMount();

      //满减规则
      C.manjianRule = {$order_count.manjian|json_encode};
      <if condition='C("REAL_NAME") eq 1 '>
        order.init(total_price,1);
      <else /> 
        order.init(total_price);
      </if>
      
      receiver.init();
      invoice.init();
      //获取赠品
      cart.getSendItem({:I('get.buynow')});
    });
</script>

</block>